<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>表单提交</title>
</head>
<body>
    {% if product_form.errors %}
        <p>
            数据出错啦，错误信息：{{ product_form.errors }}.
        </p>
    {% else %}
    <form action="" method="post">
        {% csrf_token %}
        <table>
            {{ product_form.as_table }}
        </table>
        <input type="submit" value="提交">
    {{ product_form.type.type }}
    </form>
    {% endif %}
</body>
</html>